﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ISoldier : ICharacter
{
	public ISoldier()
	{

	}

	public override void Attack(ICharacter target)
	{
		m_Weapon.ShowShootEffect();
		switch(m_Weapon.GetWeaponType())
		{
			case ENUM_Weapon.Gun:
				m_Weapon.ShowBulletEffect(target.GetPosition(), 0.03f, 0.2f);
				m_Weapon.ShowSoundEffect("GunShot");
				break;
			case ENUM_Weapon.Rifle:
				m_Weapon.ShowBulletEffect(target.GetPosition(), 0.5f, 0.2f);
				m_Weapon.ShowSoundEffect("RifleShot");
				break;
			case ENUM_Weapon.Rocket:
				m_Weapon.ShowBulletEffect(target.GetPosition(), 0.8f, 0.2f);
				m_Weapon.ShowSoundEffect("RocketShot");
				break;
		}
		m_Weapon.Fire(target);
	}

}
